<?php


namespace app\command;


use app\admin\services\task\TaskBaseService;
use app\data\service\OrderService;
use think\admin\Command;
use think\admin\Exception;
use think\console\Input;
use think\console\Output;

class ThinkCronTab extends Command
{

    protected function configure(){
        $this->setName('ThinkCronTab');
        $this->setDescription('开启定时任务');
    }

    protected function execute(Input $input, Output $output)
    {
        $output->writeln('开始定时任务');
        $tasks = new TaskBaseService();
        $tasks->execute_task();
        $output->writeln('定时任务结束');
    }

}